If a swatch name is given then that swatch would be used.
If both a swatch name and a color value are given then a new swatch would be generated or a current swatch would be changed using the given values.
If an existing CMYK swatch was assigned rgb colors then it should be switched to an rgb swatch.
This needs more thought 🤔
As of now gradients and patterns need to be provided by the user and applied using the swatch names.
Having access to book colors is a planned feature.
Perhaps in the future we will allow for gradient generation. Pattern generation looks improbable 😁
P.s. I will try figure out how to change this from a tip to a note some point this year.
// Will create / modify the swatch "Lab_Green"// and apply it to objects tagged "dog_fill" or "cat_fill"{"tag":["dog_fill","cat_fill"],// or possibly "dog_fill,cat_fill""fill":{"swatch":{"name":"Lab_Green","global":true,"type":"lab","l":100,"a":-128,"b":127}}}
swatch("Summer ()", lab(100,-128,127), true)
sheet(0).a[1] = 3cm|swatch("Summer, ()", lab(100,-128,127), true)
Plain Swatch
Summer
Swatch with brackets
"Summer(2)"
Summer(2) = We don't know what you want from us!
::: theorem Newton's First Law
In an inertial frame of reference, an object either remains at rest or continues to move at a constant velocity, unless acted upon by a force.
:::
// Will apply the swatch "Lab_Green" to objects tagged "dog_fill" or "cat_fill"{"tag":["dog_fill","cat_fill"],// or possibly "dog_fill,cat_fill""fill":{"swatch":{"name":"Lab_Green"}}}
// Will apply the color to objects tagged "dog_fill" or "cat_fill"{"tag":["dog_fill","cat_fill"],// or possibly "dog_fill,cat_fill""fill":{"color":{"type":"lab","l":100,"a":-128,"b":127}}}
Note: We need to discus the JSON formats written here!